package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaShouHou;
import com.ruoyi.system.mapper.JiajiaShouHouMapper;
import com.ruoyi.system.service.IJiajiaShouHouService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 申请售后Service业务层处理
 * 
 * @author knd
 * @date 2021-11-04
 */
@Service
public class JiajiaShouHouServiceImpl implements IJiajiaShouHouService
{
    @Autowired
    private JiajiaShouHouMapper jiajiaShouHouMapper;

    /**
     * 查询申请售后
     * 
     * @param id 申请售后主键
     * @return 申请售后
     */
    @Override
    public JiajiaShouHou selectJiajiaShouHouById(Long id)
    {
        return jiajiaShouHouMapper.selectJiajiaShouHouById(id);
    }

    /**
     * 查询申请售后列表
     * 
     * @param jiajiaShouHou 申请售后
     * @return 申请售后
     */
    @Override
    @DataScope(deptAlias = "d")
    public List<JiajiaShouHou> selectJiajiaShouHouList(JiajiaShouHou jiajiaShouHou)
    {
        return jiajiaShouHouMapper.selectJiajiaShouHouList(jiajiaShouHou);
    }

    /**
     * 新增申请售后
     * 
     * @param jiajiaShouHou 申请售后
     * @return 结果
     */
    @Override
    public int insertJiajiaShouHou(JiajiaShouHou jiajiaShouHou)
    {
        return jiajiaShouHouMapper.insertJiajiaShouHou(jiajiaShouHou);
    }

    /**
     * 修改申请售后
     * 
     * @param jiajiaShouHou 申请售后
     * @return 结果
     */
    @Override
    public int updateJiajiaShouHou(JiajiaShouHou jiajiaShouHou)
    {
        return jiajiaShouHouMapper.updateJiajiaShouHou(jiajiaShouHou);
    }

    /**
     * 批量删除申请售后
     * 
     * @param ids 需要删除的申请售后主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaShouHouByIds(String ids)
    {
        return jiajiaShouHouMapper.deleteJiajiaShouHouByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除申请售后信息
     * 
     * @param id 申请售后主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaShouHouById(Long id)
    {
        return jiajiaShouHouMapper.deleteJiajiaShouHouById(id);
    }
}
